﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace POVRay {
    public class ImageMap {
        public BitmapType? BitmapType { get; set; }
        public string FileName { get; set; }
        //TODO: IMAGE_MAP_MODS

        public ImageMap(string fileName) {
            FileName = fileName;
        }

        public ImageMap(string fileName, BitmapType bitmapType) {
            FileName = fileName;
            BitmapType = bitmapType;
        }

        public string ToString(int level) {
            StringBuilder sb = new StringBuilder();
            sb.Append("image_map { ");

            if (BitmapType.HasValue) {
                sb.Append(Scene.Indentation(level + 1) + BitmapType.Value + " ");
            }
            if (FileName != null) {
                sb.Append(Scene.Indentation(level + 1) + "\"" + FileName + "\" ");
            }

            sb.Append(Scene.Indentation(level) + "}");
            return sb.ToString();
        }
    }

    public enum BitmapType {
        gif, tga, iff, ppm, pgm, png, jpeg, tiff, sys
    }
}
